import { View } from "@tarojs/components";
import clsx from "clsx";

export default function Index() {
  return (
    <>
      <View className="font-semibold text-lg sticky top-0 bg-white p-4 z-10">
        LPR利率
      </View>
      <View className="px-4">
        <View className="flex border-b border-gray-600 py-1">
          <View className="w-28">调整日期</View>
          <View className="flex-1">1年期</View>
          <View className="flex items-center">5年期</View>
        </View>
        {data.map((d, k) => (
          <View
            key={k}
            className={clsx("flex py-1", {
              "border-b border-gray-400": k < data.length - 1,
            })}
          >
            <View className="w-28">{d.date}</View>
            <View className="flex-1">{d.oneYear}</View>
            <View>{d.fiveYear}</View>
          </View>
        ))}
      </View>
    </>
  );
}

const data = [
  { date: "2024-08-20", oneYear: "3.35%", fiveYear: "3.85%" },
  { date: "2024-07-22", oneYear: "3.35%", fiveYear: "3.85%" },
  { date: "2024-06-20", oneYear: "3.45%", fiveYear: "3.95%" },
  { date: "2024-05-20", oneYear: "3.45%", fiveYear: "3.95%" },
  { date: "2024-04-22", oneYear: "3.45%", fiveYear: "3.95%" },
  { date: "2024-03-20", oneYear: "3.45%", fiveYear: "3.95%" },
  { date: "2024-02-20", oneYear: "3.45%", fiveYear: "3.95%" },
  { date: "2024-01-22", oneYear: "3.45%", fiveYear: "4.20%" },
  { date: "2023-12-20", oneYear: "3.45%", fiveYear: "4.20%" },
  { date: "2023-11-20", oneYear: "3.45%", fiveYear: "4.20%" },
  { date: "2023-10-20", oneYear: "3.45%", fiveYear: "4.20%" },
  { date: "2023-09-20", oneYear: "3.45%", fiveYear: "4.20%" },
  { date: "2023-08-21", oneYear: "3.45%", fiveYear: "4.20%" },
  { date: "2023-07-20", oneYear: "3.55%", fiveYear: "4.20%" },
  { date: "2023-06-20", oneYear: "3.55%", fiveYear: "4.20%" },
  { date: "2023-05-22", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2023-04-20", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2023-03-20", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2023-02-20", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2023-01-20", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2022-12-20", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2022-11-21", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2022-10-20", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2022-09-20", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2022-08-22", oneYear: "3.65%", fiveYear: "4.30%" },
  { date: "2022-07-20", oneYear: "3.70%", fiveYear: "4.45%" },
  { date: "2022-06-20", oneYear: "3.70%", fiveYear: "4.45%" },
  { date: "2022-05-20", oneYear: "3.70%", fiveYear: "4.45%" },
  { date: "2022-04-20", oneYear: "3.70%", fiveYear: "4.60%" },
  { date: "2022-03-21", oneYear: "3.70%", fiveYear: "4.60%" },
  { date: "2022-02-21", oneYear: "3.70%", fiveYear: "4.60%" },
  { date: "2022-01-20", oneYear: "3.70%", fiveYear: "4.60%" },
  { date: "2021-12-20", oneYear: "3.80%", fiveYear: "4.65%" },
  { date: "2021-11-22", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-10-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-09-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-08-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-07-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-06-21", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-05-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-04-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-03-22", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-02-22", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2021-01-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-12-21", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-11-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-10-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-09-21", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-08-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-07-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-06-22", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-05-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-04-20", oneYear: "3.85%", fiveYear: "4.65%" },
  { date: "2020-03-20", oneYear: "4.05%", fiveYear: "4.75%" },
  { date: "2020-02-20", oneYear: "4.05%", fiveYear: "4.75%" },
  { date: "2020-01-20", oneYear: "4.15%", fiveYear: "4.80%" },
  { date: "2019-12-20", oneYear: "4.15%", fiveYear: "4.80%" },
  { date: "2019-11-20", oneYear: "4.15%", fiveYear: "4.80%" },
  { date: "2019-10-21", oneYear: "4.20%", fiveYear: "4.85%" },
  { date: "2019-09-20", oneYear: "4.20%", fiveYear: "4.85%" },
];
